<include file="public/head"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>

</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:cmf_plugin_url('QbtAdvertising://AdminIndex/ads_index')}">广告位置页面</a></li>
        <li class="active"><a href="#">添加广告位置页面</a></li>
    </ul>
    <form action="{:cmf_plugin_url('QbtAdvertising://AdminIndex/adaddpost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">
                    <tr>
                        <th>广告位名称<span style="color: red;">*</span></th>
                        <td>
                            <input class="form-control" type="text" name="position_name"
                                   id="position_name" required value="" placeholder="请输入广告位名称"/>
                        </td>
                    </tr>
                    <tr>
                        <th>广告位标识</th>
                        <td>
                            <input class="form-control" type="text" name="ad_logo" style="width:400px"
                                   value="" placeholder="请输入广告位标识">
                        </td>
                    </tr>
                    <tr>
                        <th>媒介类型</th>
                        <td>
                            <select class="form-control" name="media_type">
                                <option value="0">图片</option>
                                <option value="1">文字</option>
                                <option value="2">自定义</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>广告位描述</th>
                        <td><textarea class="form-control" name="position_desc" style="height: 50px;"></textarea>
                        </td>
                    </tr>
                    
                    </tbody>
                </table>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                        <!-- <a class="btn btn-default" href="{:url('AdminPage/index')}">{:lang('BACK')}</a> -->
                        <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<include file="public/scripts"/>
<script type="text/javascript">
    window.onload = function () {
         console.log(parent.$("#yugl"));
         var count = document.getElementById("count").value;
         if(count==0){
            parent.$("#yugl").remove();
         }else{
            parent.$("#yugl").text("("+count+")");
        }         
     };

</script>
</body>
</html>